<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否允许重复:</label>
           <div class="col-xs-12 col-sm-8">
          <select name="row[is_repeat]" id="c-is_repeat" class="form-control selectpicker">
                  <option value="1"  {if condition=" $row['is_repeat'] == 1 "}selected{/if}>是</option>
                  <option value="2"  {if condition=" $row['is_repeat'] == 2 "}selected{/if}>否</option>
             </select>
        </div>
     </div>

     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否只展示:</label>
           <div class="col-xs-12 col-sm-8">
          <select name="row[is_show]" id="c-is_show" class="form-control selectpicker">
                  <option value="1"  {if condition=" $row['is_show'] == 1 "}selected{/if}>是</option>
                  <option value="2"  {if condition=" $row['is_show'] == 2 "}selected{/if}>否</option>
             </select>
        </div>
     </div>
     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否限制城市:</label>
           <div class="col-xs-12 col-sm-8">
          <select name="row[is_city]" id="c-is_city" class="form-control selectpicker">
                  <option value="1"  {if condition=" $row['is_city'] == 1 "}selected{/if}>是</option>
                  <option value="2"  {if condition=" $row['is_city'] == 2 "}selected{/if}>否</option>
             </select>
        </div>
     </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_count_threshold')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_count_threshold" data-rule="required" class="form-control" name="row[user_count_threshold]" type="number" value="{$row.user_count_threshold|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('限制天数')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-limit-days" value="{$row.limit_days}" class="form-control" name="row[limit_days]" placeholder="限制拉新人数天数,例如19天3人  0为不限制" type="number">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">选择城市:</label>
           <div class="col-xs-12 col-sm-8">
             <input id="c-city"  data-source="activityone.laxin/cityselectpage" class="form-control selectpage" name="row[city]" type="text" value="{$row.city}" data-multiple="true">
        </div>
     </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">赠送的券:</label>
           <div class="col-xs-12 col-sm-8">
          <select name="row[gift_coupon][]" id="c-gift_coupon" class="form-control selectpicker" multiple>
               {foreach name="couponlist" item="v"}
                  <option value="{$v.id}"  {in name="$v.id" value="$row.gift_coupon"}selected{/in}>{$v.name}</option>
               {/foreach}
             </select>
        </div>
     </div>
     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">上级赠送的券:</label>
           <div class="col-xs-12 col-sm-8">
          <select name="row[superior_gift_coupon][]" id="c-superior_gift_coupon" class="form-control selectpicker" multiple>
               {foreach name="couponlist" item="v"}
                  <option value="{$v.id}"  {in name="$v.id" value="$row.gift_coupon"}selected{/in}>{$v.name}</option>
               {/foreach}
             </select>
        </div>
     </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{$row.start_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{$row.end_time}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
